package com.alliance.shuwei.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import com.alliance.shuwei.entity.Category;

@Repository
public interface CategoryDao extends CrudRepository<Category, Integer> {
	@Query("select ce from Category ce where ce.parentCategory is null")
	List<Category> findRootCategory();
}
